import request from '@/utils/request'

export default {
  getDishes(params = {}) {
    return request({
      url: '/dishes',
      method: 'GET',
      data: params
    })
  },
  
  getDishDetail(id) {
    return request({
      url: `/dishes/${id}`,
      method: 'GET'
    })
  },
  
  getCategories() {
    return request({
      url: '/dishes/categories',
      method: 'GET'
    })
  },
  
  getRecommendDishes() {
    return request({
      url: '/dishes/recommend',
      method: 'GET'
    })
  },
  
  searchDishes(keyword) {
    return request({
      url: '/dishes/search',
      method: 'GET',
      data: { keyword }
    })
  },
  
  getBanners() {
    return request({
      url: '/banners',
      method: 'GET'
    })
  }
}